<?php

/**
* Glavni controler
**/

try
{
    require('library/autoload.php');
    date_default_timezone_set('Europe/Zagreb');
    Config::load();
    Debug::off();
    SiteRouter::route();
}
catch (FatalException $e)
{
    echo '<pre style="padding: 20px; border: 1px red solid;">';
    echo 'FatalException!!' . "\n\n";
    echo 'Message: ' . $e->getMessage() . "\n\n";
    echo 'File: ' . $e->getFile() . "\n";
    echo 'Line: ' . $e->getLine() . "\n\n";

    echo 'Exception debug data: ' . "\n";
    var_dump($e->getDebugData());
    echo "\n";

    echo 'Trace: ' . "\n";
    echo $e->getTraceAsString();
    echo '</pre>';
}

?>